using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spinning.Spinning.Entity;
using Spinning.Spinning.Unitity;
using Microsoft.Xna.Framework;
using Spinning.Spinning.Scenes.ProcessScene.TabLayouts;
using Spinning.Spinning.Interface;

namespace Spinning.Spinning.Scenes.ProcessScene.Items
{
    class SubSceneInItemsScene : TabLayoutScene, ISaveLoad
    {
        TopMemberScene tms;
        ItemListScene ils;
        public override void OnLoad()
        {
            base.OnLoad();
            Size = new Microsoft.Xna.Framework.Vector2(426, 464 + 48);

            Tab top = new Tab(this);
            top.textureName = "item_store/top";
            top.OnLoad();
            Tab items = new Tab(this);
            items.textureName = "item_store/items";
            items.OnLoad();

            tms = new TopMemberScene();
            tms.Color = Color.Transparent;
            tms.ZIndex = Constants.ui;
            tms.Position = new Vector2(0, 48);
            tms.OnLoad();
            this.Attach(tms);
            top.ContainScene = tms;

            ils = new ItemListScene();
            ils.Color = Color.Transparent;
            ils.ZIndex = Constants.ui;
            ils.Position = new Vector2(0, 48);
            ils.OnLoad();
            this.Attach(ils);
            items.ContainScene = ils;

            AddTab(top);
            AddTab(items);
            SetselectTab(top);


            Sprite backGroundSprite = new Sprite();
            backGroundSprite.textureName = "item_store/block01";
            backGroundSprite.ZIndex = Constants.background;
            backGroundSprite.OnLoad();
            backGroundSprite.Position = new Vector2(0, 48);
            this.Attach(backGroundSprite);
            SortChildren();
        }

        public override BaseScene Clone()
        {
            throw new NotImplementedException();
        }

        public void Save(Unitity.Storage.SaveData state)
        {
            //tms.Save(state);
            //ils.Save(state);
        }

        public void Load(Unitity.Storage.SaveData state)
        {
            //tms.Load(state);
            //ils.Load(state);
        }
    }
}
